How to Get Numeric IP When Domain Address is Provided
We do not recommend using numeric addresses due to the possibility of them changing over time. Instead of entering an IP address, simply enter the domain address we provide in the panel. In most cases, the desire to obtain a numeric address comes from connection problems. The admin tries to connect the database and for some reason it doesn't work, then looks for the cause where it isn't - in the domain address.
In Windows, there are several methods available to convert a domain name (e.g., sql.23.svpj.link) to a numeric IP address. All commands are executed in the Command Prompt (CMD) or PowerShell.
Command Prompt (CMD) Methods
1. ping Command
The simplest and fastest way:
ping sql.23.svpj.link
The IP address will be displayed in the first line of the response, e.g.:
Pinging sql.23.svpj.link [1.2.3.4] with 32 bytes of data:
To execute only one query:
ping -n 1 sql.23.svpj.link
2. nslookup Command
Standard DNS tool available in every version of Windows:
nslookup sql.23.svpj.link
The result will show:
- The DNS server that responded to the query
- The IP address of the searched domain
Example output:
Server: dns.google
Address: 8.8.8.8
Non-authoritative answer:
Name: sql.23.svpj.link
Address: 1.2.3.4
PowerShell Methods
1. Resolve-DnsName Cmdlet
The most powerful tool in PowerShell:
Resolve-DnsName sql.23.svpj.link
IP address only (without additional information):
(Resolve-DnsName sql.23.svpj.link).IPAddress
2. System.Net.Dns Object
Using .NET Framework:
[System.Net.Dns]::GetHostAddresses("sql.23.svpj.link")
First IP address only:
[System.Net.Dns]::GetHostAddresses("sql.23.svpj.link")[0].IPAddressToString
3. Test-Connection Cmdlet
Modern version of ping:
Test-Connection -ComputerName sql.23.svpj.link -Count 1
IP address only:
(Test-Connection -ComputerName sql.23.svpj.link -Count 1).Address